package com.bocom.dao;

import com.bocom.vo.TruckBase;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * Author shenzhifeng
 * Create time  2019/8/26 14:53
 * Description
 * Modifier
 * Reasons
 */
@Mapper
public interface InterfaceAPIDao {

    @Insert(" INSERT INTO PERSONPHOTOCAR (COMPANYNAME,SBID,SFZH,CPHM,HPZL,INSPECTORID,INSPECTORNAME, " +
            " PHONEDATALIST_IMSI,PHONEDATALIST_IMEI,PHONEDATALIST_PHONENUMBER,PHONEDATALIST_MAC, " +
            " PHOTOS_PHOTO,PHOTOS_FEATUREID,PHOTOS_KEYPERSON,PHOTOS_SFZH,PHOTOS_SIMILARITY,RKSJ )  " +
            " VALUES (#{companyname,jdbcType = VARCHAR},#{sbid,jdbcType = VARCHAR},#{sfzh,jdbcType = VARCHAR},#{cphm,jdbcType = VARCHAR},#{hpzl,jdbcType = VARCHAR},#{inspectorid,jdbcType = VARCHAR},#{inspectorname,jdbcType = VARCHAR}, " +
            " #{phonedatalist_imsi,jdbcType = VARCHAR},#{phonedatalist_imei,jdbcType = VARCHAR},#{phonedatalist_phonenumber,jdbcType = VARCHAR},#{phonedatalist_mac,jdbcType = VARCHAR}, " +
            " #{photos_photo,jdbcType = VARCHAR},#{photos_featureid,jdbcType = VARCHAR},#{photos_keyperson,jdbcType = VARCHAR},#{photos_sfzh,jdbcType = VARCHAR},#{photos_similarity,jdbcType = VARCHAR},#{rksj,jdbcType = VARCHAR}) ")
    int insert(Map<String,Object> map);


    @Insert(" INSERT INTO PHOTO (COMPANYNAME,SBID,INSPECTORID,INSPECTORNAME, " +
            " PHOTOS_PHOTO,PHOTOS_FEATUREID,PHOTOS_KEYPERSON,PHOTOS_SFZH,PHOTOS_SIMILARITY,RKSJ )  " +
            " VALUES (#{companyname,jdbcType = VARCHAR},#{sbid,jdbcType = VARCHAR},#{inspectorid,jdbcType = VARCHAR},#{inspectorname,jdbcType = VARCHAR}, " +
            " #{photos_photo,jdbcType = VARCHAR},#{photos_featureid,jdbcType = VARCHAR},#{photos_keyperson,jdbcType = VARCHAR},#{photos_sfzh,jdbcType = VARCHAR},#{photos_similarity,jdbcType = VARCHAR},#{rksj,jdbcType = VARCHAR}) ")
    int insertPhoto(Map<String,Object> map);



    @Insert(" INSERT INTO SECURITYLANES (CPHM,HPZL,CLLB,CHECKPOINTNAME,CLZT,TIME,NAME,SEX,SFZH,RYZT,RKSJ) " +
            " VALUES ( " +
            " #{cphm,jdbcType = VARCHAR},#{hpzl,jdbcType = VARCHAR},#{cllb,jdbcType = VARCHAR}," +
            " #{checkpointName,jdbcType = VARCHAR},#{clzt,jdbcType = VARCHAR},#{time,jdbcType = VARCHAR}," +
            " #{name,jdbcType = VARCHAR},#{sex,jdbcType = VARCHAR},#{sfzh,jdbcType = VARCHAR}," +
            " #{ryzt,jdbcType = VARCHAR},#{rksj,jdbcType = VARCHAR} ) ")
    int insertSecurityLanes(Map<String,Object> map);



    void truncateTable();

    int insertTruckBase(List<TruckBase> list);


}
